// base for basketball
var Basketball  = function () {
    this.intro = "basketball is popular in American";
}
Basketball.prototype = {
    getNumber : function () {
        console.log('every team need 5 players')
    },
    getBallSize: function () {
        console.log('this ball is large size')
    }

};

// base for football
var Football  = function () {
    this.intro = "football is popular in American";
}
Football.prototype = {
    getNumber : function () {
        console.log('every team need 11 players');
    },
    getBallSize: function () {
        console.log('this ball is medel size')
    }
};

// base for Tennies
var Tennies  = function () {
    this.intro = "Tennies is popular in American";
}
Tennies.prototype = {
    getNumber : function () {
        console.log('every team need 1 players');
    },
    getBallSize: function () {
        console.log('this ball is small size')
    }
};

// factory for sports

var SportsFactory = function(name){
    switch(name){
        case 'NBA':
            return new Basketball();
        case 'WORDCUP':
            return new Foottball();
        case 'FrenchOpen':
            return new Tennies();
    
    }
}
